<?php require_once APPLICATION_PATH.'/common/functions.php';?>
<div id="full-screen-slider">
	<ul id="slides">
		<?php foreach ($this->slide as $sl) {?>
			<li style="background: transparent url('/public/imgs/slide/<?=$sl['img'] ?>') no-repeat scroll center top;
				 z-index: 900; display: <?=($sl['id'] == $this->slide[0]['id'] ? "block":"none" ) ?>;">
				<a href="<?=$sl['link'] ?>" target="_blank"><?=$sl['title'] ?></a>
			</li>
		<?php }?>

	</ul>

</div>

<?php foreach ($this->plates as $plate) {
	$cate1 = $this->tblCate->getCateById($plate['cate1']);
	$cate2 = $this->tblCate->getCateById($plate['cate2']);
	$cate3 = $this->tblCate->getCateById($plate['cate3']);
	$artsInCate1 = $this->tblArticle->getArticlesWithFirst($cate1['id']);
	$artsInCate2 = $this->tblArticle->getArticlesWithFirst($cate2['id']);
	$artsInCate3 = $this->tblArticle->getArticlesWithFirst($cate3['id']);
	?>

<div class="cms-content">
	<div class="cms-title">
		<h2><?=$plate['name'] ?></h2>
		<ul>
			<li><a href="/index.php/Index/aclist/cateid/<?=$cate1['id'] ?>"><?=$cate1['name'] ?></a></li>
			<li><a href="/index.php/Index/aclist/cateid/<?=$cate2['id'] ?>"><?=$cate2['name'] ?></a></li>
			<li><a href="/index.php/Index/aclist/cateid/<?=$cate3['id'] ?>"><?=$cate3['name'] ?></a></li>
		</ul>
		</div>

		<div class="thrbc mr13">
				<h3><a href="/index.php/Index/aclist/cateid/<?=$cate1['id'] ?>" target="_top"></a><span><?=$cate1['name'] ?></span></h3>

					<div class="thrpic">
					   <a href="/index.php/Index/detail/id/<?=$artsInCate1['first']['id'] ?>" target="_blank">
							<img src="<?=catch_first_image($artsInCate1['first']['content']) ?>" alt="<?=$artsInCate1['first']['title'] ?>" height="110px" width="130px" /><?=$artsInCate1['first']['title'] ?></a>
						<p style="color: rgb(0, 120, 214);"></p>
						<a href="" target="_blank"></a>
					</div>

					<div class="rollup" style="overflow: hidden;">
						<ul>
							<?php foreach ($artsInCate1['rest'] as $art) {?>
								<li><a target="_blank" href="/index.php/Index/detail/id/<?=$art['id'] ?>" class="nr" title="<?=$art['title'] ?>"><?=$art['title'] ?></a></li>
							<?php }?>
						</ul>
					</div>

		</div>

	<div class="thrbc mr13">
            <h3><a href="/index.php/Index/aclist/cateid/<?=$cate2['id'] ?>" target="_top"></a><span><?=$cate2['name'] ?></span></h3>
			<div class="thrpic">
			   <a href="/index.php/Index/detail/id/<?=$artsInCate2['first']['id'] ?>" target="_blank">
					<img src="<?=catch_first_image($artsInCate2['first']['content']) ?>" alt="<?=$artsInCate2['first']['title'] ?>" height="110px" width="130px" /><?=$artsInCate2['first']['title'] ?></a>
				<p style="color: rgb(0, 120, 214);"></p>
				<a href="" target="_blank"></a>
			</div>

			<ul>
				<?php foreach ($artsInCate2['rest'] as $art) {?>
					<li><a target="_blank" href="/index.php/Index/detail/id/<?=$art['id'] ?>" class="nr" title="<?=$art['title'] ?>"><?=$art['title'] ?></a></li>
				<?php }?>
			</ul>
	</div>

	<div class="thrbc">
            <h3><a href="/index.php/Index/aclist/cateid/<?=$cate3['id'] ?>" target="_top"></a><span><?=$cate3['name'] ?></span></h3>
			<div class="thrpic">
			   <a href="/index.php/Index/detail/id/<?=$artsInCate3['first']['id'] ?>" target="_blank">
					<img src="<?=catch_first_image($artsInCate3['first']['content']) ?>" alt="<?=$artsInCate3['first']['title'] ?>" height="110px" width="130px" /><?=$artsInCate3['first']['title'] ?></a>
				<p style="color: rgb(0, 120, 214);"></p>
				<a href="" target="_blank"></a>
			</div>

			<ul>
				<?php foreach ($artsInCate3['rest'] as $art) {?>
					<li><a target="_blank" href="/index.php/Index/detail/id/<?=$art['id'] ?>" class="nr" title="<?=$art['title'] ?>"><?=$art['title'] ?></a></li>
				<?php }?>
			</ul>

	</div>

	</div>
<?php }?>




	<div class="cms-content">
	<div class="cms-title">

		<h2>企业展示</h2>
		<a href="/index.php/Index/aclist/cateid/2">
		<div class="more">
		    <span class="">更多</span>
		</div>
		</a>
	</div>

	<?php
		foreach ($this->tblArticle->getArticlesByCate(2) as $art) {?>
		<div class="img-list">
			<a href="/index.php/Index/detail/id/<?=$art['id'] ?>" target="_blank"><img src="<?=catch_first_image($art['content']) ?>"  alt="<?=$art['title'] ?>">
			<h3><?=$art['title'] ?></h3>
			</a>
		</div>
	<?php }?>
 </div>
